<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        width: 150px;
        margin: 0 auto;
        cursor: pointer;
      }
      p {
        width: 150px;
        margin: 0 auto;
        text-align: center;
        display: none;
      }
    </style>
  </head>
  <body>
    <div class="box" onmouseout="chaa()" onmouseover="cha()">
      <input type="checkbox" value="" />两周内自动登录
    </div>
    <p>测试</p>
  </body>
</html>
<script>
  var dom = document.getElementsByTagName("p")[0];
  function cha() {
    dom.style.display = "block";
  }
  function chaa() {
    dom.style.display = "none";
  }
</script>
